Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 531992727b3d3430b89d775cf5ec5eef4dac9149


Parents : 4cd6416
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-05-02T23:11:59-05:00

feat(flatpak): add custom desktop template and update Flatpak permissions

Changes

3 files changed, 27 insertions(+), 1 deletions(-)

M package.json +7 -1

Diff

diff --git a/electron/flatpak-desktop.ejs b/electron/flatpak-desktop.ejs
new file mode 100644
index 00000000..ec7b7974
--- /dev/null
+++ b/electron/flatpak-desktop.ejs
@@ -0,0 +1,12 @@
+[Desktop Entry]
+<% if (productName) { %>Name=<%= productName %>
+<% } %><% if (description) { %>Comment=<%= description %>
+<% } %><% if (genericName) { %>GenericName=<%= genericName %>
+<% } %><% if (desktopExec) { %>Exec=<%= desktopExec %> %U
+<% } %><% if (id) { %>Icon=<%= id %>
+<% } %>Type=Application
+StartupNotify=true
+<% if (id) { %>StartupWMClass=<%= id %>
+<% } %><% if (categories && categories.length) { %>Categories=<%= categories.join(';') %>;
+<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;
+<% } %>

diff --git a/forge.config.js b/forge.config.js
index d90ce93e..372710a7 100644
--- a/forge.config.js
+++ b/forge.config.js
@@ -1,6 +1,7 @@
const { FusesPlugin } = require("@electron-forge/plugin-fuses");
const { FuseV1Options, FuseVersion } = require("@electron/fuses");
const which = require("which");
+const path = require("path");
function hasExecutable(name) {
return which.sync(name, { nothrow: true }) !== null;
@@ -111,6 +112,8 @@ module.exports = {
sdk: "org.freedesktop.Sdk",
base: "org.electronjs.Electron2.BaseApp",
baseVersion: "25.08",
+ // Custom desktop template for proper StartupWMClass
+ desktopTemplate: path.join(__dirname, "electron", "flatpak-desktop.ejs"),
finishArgs: [
"--share=ipc",
"--share=network",
@@ -120,8 +123,13 @@ module.exports = {
"--allow=bluetooth",
"--filesystem=home",
"--talk-name=org.freedesktop.Notifications",
+ "--talk-name=org.freedesktop.DBus",
+ "--talk-name=org.freedesktop.portal.Desktop",
+ "--own-name=com.sudoivan.reticulummeshchatx",
"--env=TMPDIR=/var/tmp",
"--socket=pulseaudio",
+ "--socket=pipewire",
+ "--filesystem=xdg-run/pipewire-0",
],
extraFlatpakBuilderArgs: ["--verbose"],
},

diff --git a/package.json b/package.json
index b5e42fa8..701cc777 100644
--- a/package.json
+++ b/package.json
@@ -270,7 +270,13 @@
"--device=dri",
"--allow=bluetooth",
"--filesystem=home",
- "--talk-name=org.freedesktop.Notifications"
+ "--talk-name=org.freedesktop.Notifications",
+ "--talk-name=org.freedesktop.DBus",
+ "--talk-name=org.freedesktop.portal.Desktop",
+ "--own-name=com.sudoivan.reticulummeshchatx",
+ "--socket=pulseaudio",
+ "--socket=pipewire",
+ "--filesystem=xdg-run/pipewire-0"
]
},
"dmg": {


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────